<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>聚首页</title>
<link href="img/ggCSS.css" rel="stylesheet" type="text/css" />
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>

</head>

<body margin="00,0,0,">
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="<?php echo SITE_URL?>img/group/index/group_index_r1_c1.jpg" width="990" height="7" /></td>
  </tr>
</table>
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" background="<?php echo SITE_URL?>img/group/index/group_index_r2_c1.jpg">
	<table width="95%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="30" align="left" class="tit">今日八大帮会</td>
      </tr>
    </table>
      <table width="95%" border="0" cellspacing="0" cellpadding="0">
        <tr>
        <?php
        foreach($hotTongs as $i=>$t){
		?>
          <td align="center"><a href="<?php echo SITE_URL?>tong/show/id/<?php echo $t->getId() ?>"><img src="<?php echo SITE_URL.'uploads/'.$t->getImg(); ?>" width="86" height="86" class="imghuise" /></a>
            <p class="intd"><?php echo $t->getName(); ?></p>
          <p class="intd"><?php echo $t->getMembers(); ?></p>          </td>
          <?php } ?>
        </tr>
    </table></td>
  </tr>
</table>
<table width="990" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="<?php echo SITE_URL?>img/group/index/group_index_r6_c1.jpg" width="990" height="7" /></td>
  </tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="10"></td>
  </tr>
</table>
<table width="1000" height="28" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="637" align="center" valign="top"><table width="616" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r1_c1.jpg" width="616" height="6" /></td>
      </tr>
    </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" background="<?php echo SITE_URL?>img/group/index/group_index1_r2_c1.jpg">
		  <table width="95%" height="30" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="80%" align="left" class="tit">新建帮会</td>
              <td width="20%" class="titsmall"><a href="<?php echo SITE_URL?>tong/create/">我也要建</a></td>
            </tr>
          </table>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                      <?php
        foreach($newTongs as $i=>$t){
		?>
                <td align="center"><a href="<?php echo SITE_URL?>tong/show/id/<?php echo $t->getId() ?>"><img src="<?php echo SITE_URL.'uploads/'.$t->getImg(); ?>" width="86" height="86" class="imghuise" /></a>
                            <p  class="intd"><?php echo $t->getName(); ?></p>
          <p  class="intd">由<a href="<?php echo SITE_URL.'sns/space.php?uid='.$t->getUcMembers()->getUid(); ?>"><?php echo $t->getUcMembers()->getUsername(); ?></a>创建</p>                </td>
                <?php } ?>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r10_c1.jpg" width="616" height="6" /></td>
        </tr>
      </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r1_c1.jpg" width="616" height="6" /></td>
        </tr>
      </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" background="<?php echo SITE_URL?>img/group/index/group_index1_r2_c1.jpg"><table width="95%" height="30" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="59%" align="left" class="tit">所有帮会</td>
              <td width="41%" class="titsmall">帮派分类：
                  <select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
                    <option>请选择帮会类型</option>
                    <?php foreach ($tongTypes as $t){?>
                    <option value="<?php echo SITE_URL?>tong/index/tong_type/<?php echo $t->getId();?>"><?php echo $t->getName();?></option>
                    <?php } ?>
                  </select>
                </td>
            </tr>
          </table>
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr>
              <?php foreach($typeTongs->getResults() as $i=>$t){ ?>
                <td align="center">
                                      <?php
		if(($i%5)==0 && $i!=0){
			echo '</tr></table> <table width="95%" border="0" cellspacing="0" cellpadding="0"><tr>';
		}
		?>
                <a href="<?php echo SITE_URL?>tong/show/id/<?php echo $t->getId() ?>"><img src="<?php echo SITE_URL.'uploads/'.$t->getImg(); ?>" width="86" height="86" class="imghuise" /></a>
                  <p  class="intd"> <a href="<?php echo SITE_URL?>tong/show/id/<?php echo $t->getId() ?>"><?php echo $t->getName(); ?></a></p>

</td>
              <?php }?>
              </tr>
            </table>
            
            <table width="95%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="right" height="30">
                <?php
                	function pager($pager,$pageurl,$prestr,$nextstr){
	$pagestr = '';
	if( $pager->haveToPaginate() ){
		$pagestr .=  link_to($prestr,$pageurl.$pager->getPreviousPage());
		foreach ( $pager->getLinks() as $page ){
			$pagestr .=  link_to_unless($page == $pager->getPage(),$page,$pageurl.$page);
			$pagestr .=  ($page != $pager->getCurrentMaxLink()) ? '&nbsp;':'';
		}
		$pagestr .=  link_to($nextstr,$pageurl.$pager->getNextPage());
	}
	return $pagestr;
}
				?>
                <span class="word">共<?php echo $typeTongs->getNbResults();?>个帮会</span><span class="yh">
                   <?php 
                    $pageurl = '/tong/index/?page=';
                    $prestr = '上页';
                    $nextstr = '下页';
                  	echo pager($typeTongs,$pageurl,$prestr,$nextstr);
				?>
                </span></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r10_c1.jpg" width="616" height="6" /></td>
        </tr>
      </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="616" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
    <td width="363" valign="top"><table width="355" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r1_c5.jpg" width="355" height="6" /></td>
      </tr>
    </table>
      <table width="355" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td background="<?php echo SITE_URL?>img/group/index/group_index1_r2_c5.jpg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" class="tit">活动</td>
            </tr>
          </table>
            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<?php foreach($actions as $i=>$a){ ?>
              <tr>
                <td height="25" align="left"><span class="word"><a href="<?php echo $a['url']; ?>"><?php echo $a['subject']; ?></a></span><span class="yh">&nbsp;&nbsp;<a href="<?php echo $a['url']; ?>">正在报名</a></span></td>
              </tr>
<?php } ?>
            </table></td>
        </tr>
      </table>
      <table width="355" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r7_c5.jpg" width="355" height="6" /></td>
        </tr>
      </table>
      <table width="355" height="5" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="355" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="10" background="<?php echo SITE_URL?>img/group/index/group_index1_r9_c7.jpg"><img src="<?php echo SITE_URL?>img/group/index/group_index1_r9_c6.jpg" width="7" height="188" /></td>
          <td width="337" valign="top" background="<?php echo SITE_URL?>img/group/index/group_index1_r9_c7.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="10"></td>
            </tr>
          </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td class="indexdh">富翁排行榜top8</td>
              </tr>
            </table>
             <?php
			$ncount = count($topUsers);
            for($i=0;$i<$ncount;$i++){
				$user = $topUsers[$i];
				?>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="13%" height="20"><img src="<?php echo SITE_URL?>img/sz/<?php echo $i+1; ?>.gif" width="15" height="15" /></td>
                <td width="54%" class="white"><a href="<?php echo SITE_URL.'sns/space.php?uid='.$user->getUid(); ?>"><?php echo $user->getUsername(); ?></a></td>
                <td width="33%" class="weizhi"><!--24金1银--><?php echo $user->getCredit(); ?></td>
              </tr>
            </table>
            <?php } ?>
            </td>
          <td width="10" align="right" background="<?php echo SITE_URL?>img/group/index/group_index1_r9_c7.jpg"><img src="<?php echo SITE_URL?>img/group/index/group_index1_r9_c9.jpg" width="8" height="188" /></td>
        </tr>
      </table>
      <table width="355" height="5" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="355" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="10" background="<?php echo SITE_URL?>img/group/index/group_index1_r13_c7.jpg"><img src="<?php echo SITE_URL?>img/group/index/group_index1_r13_c6.jpg" width="7" height="188" /></td>
          <td width="337" valign="top" background="<?php echo SITE_URL?>img/group/index/group_index1_r13_c7.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td height="10"></td>
            </tr>
          </table>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td class="indexdh">新贵排行榜top8</td>
              </tr>
            </table>
             <?php
			$ncount = count($topUsers2);
            for($i=0;$i<$ncount;$i++){
				$user = $topUsers[$i];
				?>
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="13%" height="20"><img src="<?php echo SITE_URL?>img/sz/<?php echo $i+1; ?>.gif" width="15" height="15" /></td>
                <td width="54%" class="white"><a href="<?php echo SITE_URL.'sns/space.php?uid='.$user->getUid(); ?>"><?php echo $user->getUsername(); ?></a></td>
                <td width="33%" class="weizhi"><!--24金1银--><?php echo $user->getCredit(); ?></td>
              </tr>
            </table>
            <?php } ?>
            </td>
          <td width="10" align="right" background="<?php echo SITE_URL?>img/group/index/group_index1_r13_c7.jpg"><img src="<?php echo SITE_URL?>img/group/index/group_index1_r13_c9.jpg" width="8" height="188" /></td>
        </tr>
      </table>
      <table width="355" height="5" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td></td>
        </tr>
      </table>
      <table width="355" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r1_c5.jpg" width="355" height="6" /></td>
        </tr>
      </table>
      <table width="355" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td background="<?php echo SITE_URL?>img/group/index/group_index1_r2_c5.jpg"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td class="tit" height="30">帮派热门话题</td>
            </tr>
          </table>
            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
              <?php  foreach ($hotTopics as $k => $t){?>
              <tr>
                <td height="20"><a href="<?php echo SITE_URL?>tong/topic/tid/<?php echo $t->getTongId();?>/topicid/<?php echo $t->getId();?>"><?php echo $t->getName();?></a>&nbsp;<?php echo $t->getVisitNum();?></td>
              </tr>
              <?php }?>
          </table></td>
        </tr>
      </table>
      <table width="355" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="<?php echo SITE_URL?>img/group/index/group_index1_r7_c5.jpg" width="355" height="6" /></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>